package com.lrs.java.j2se_self.lastJava;
import java.util.*;

public class TestArguments {
	private static final int N = 1; 
	public static void main(String[] args){
		Map<String,Integer> m = new HashMap<String,Integer>();
		if(args.length > 0){
			for(int i=0;i<args.length;i++){
				Integer j = m.get(args[i]);
				//int j = (Integer)m.get(args[i]);
				m.put(args[i],(j == null?N:j+1));
			}
		}
		System.out.println(m);
		System.out.println(m.size()+" words detected");
	}
}
